package edu.hziee.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import edu.hziee.mapper.LoginMapper;
import edu.hziee.models.Login;


@Repository
public class LoginDao {
	
	@Autowired
	LoginMapper loginmapper;
	
	public Login findLoginByName(String username){
		return loginmapper.getLoginByName(username);
		
	}
	
	public Login findLoginById(int id){
		return loginmapper.getLoginById(id);
	}

	public void modify(Login login){
		loginmapper.modify(login);
	}
	
	public void addLogin(Login login){
		loginmapper.addLogin(login);
	}
	
}
